package com.zt.ztzx.mapper;

import com.zt.ztzx.model.dto.system.SysUserDto;
import com.zt.ztzx.model.entity.system.SysRoleUser;
import com.zt.ztzx.model.entity.system.SysUser;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SysUserMapper {

    @Select("select * from sys_user where username=#{userName} and is_deleted=0")
    SysUser login(String userName);

    //动态查询
    List<SysUser> selectUserList(SysUserDto userDto);

    //添加
    int saveUser(SysUser sysUser);
    //查询用户角色
    List<Integer> getRolesByUserId(Integer userId);
}
